<?php


Class Requists
{



function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}


/**********************************************************/
		function Get_Person_Name($PID)
{
$Full_Name="";
include('../Connections/BMConnectionDB.php');
mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
$query_Upadte_Licence_Person = "SELECT * FROM person_admin_8 where Person_Identity=".$PID;
$Upadte_Licence_Person = mysql_query($query_Upadte_Licence_Person, $BMConnectionDB) or die(mysql_error());
$row_Upadte_Licence_Person = mysql_fetch_assoc($Upadte_Licence_Person);
$totalRows_Upadte_Licence_Person = mysql_num_rows($Upadte_Licence_Person);
$Full_Name=$row_Upadte_Licence_Person['First_Name']." ".$row_Upadte_Licence_Person['Father_Name']." ".$row_Upadte_Licence_Person['GrandFather_Name']." ".$row_Upadte_Licence_Person['Family_Name'];
return $Full_Name;
}


		function Get_System_Date()
		{
			$Sys_Month=date("m",time());//settype($Sys_Month,int);
			$Sys_Year =date("Y",time());//settype($Sys_Year,int);
			$Sys_Day  =date("d",time());//settype($Sys_Day,int);
			$Sys_Date="$Sys_Year"."-"."$Sys_Month"."-"."$Sys_Day";
			return $this->GetSQLValueString($Sys_Date,"date");
		}
		function Get_Last_Rec($Table,$Col)
		{

include('../Connections/BMConnectionDB.php');
mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
	$query_Recordset1 = "SELECT * from $Table";
	$Recordset1 = mysql_query($query_Recordset1, $BMConnectionDB) or die(mysql_error());
	$row_Recordset1 = mysql_fetch_assoc($Recordset1);
	$totalRows_Recordset1 = mysql_num_rows($Recordset1);
	$i=0;
	do {
		++$i;
		if($totalRows_Recordset1==$i)
			{
				return $row_Recordset1[$Col];
			}
 	   } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); 
}




		function Get_Rate_Percent()
		{
		$Rate_Percent=0;
		if(isset($_POST['Piece_Area']) && isset($_POST['Bulding_Area']))
		{
		$Rate_Percent=GetSQLValueString($_POST['Bulding_Area'], "int")/ GetSQLValueString($_POST['Piece_Area'], "int");
		}
		return $Rate_Percent;
		
		}
		
		

}


class Acquittance extends Requists
{
var $Property_Taxes;
var $Job_License;
var $Education_Ministry_Taxes;
var $Municipality_Rent;
var $Occupation_License;
var $Garbage_Fee;
var $Municipality_Court;
var $License_Bulding;
var $Water_Invoice;
var $Watercourses_Fee;
var $Other_Cridites;
					   
					   
					   
function Acquittance($Prop,$Job,$Edu,$Rent,$Occup,$Gar,$Court,$Lic_B,$W_Inv,$W_Fe,$Other)
{
						$this->Property_Taxes=$Prop;
                       $this->Job_License=$Job;
                       $this->Education_Ministry_Taxes=$Edu;
                       $this->Municipality_Rent=$Rent;
                       $this->Occupation_License=$Occup;
                       $this->Garbage_Fee=$Gar;
                       $this->Municipality_Court=$Court;
                       $this->License_Bulding=$Lic_B;
                       $this->Water_Invoice=$W_Inv;
                       $this->Watercourses_Fee=$W_Fe;
                       $this->Other_Cridites=$Other;
					   
}					   





function Insert($Person_Id,$Area_No)
{
include('../Connections/BMConnectionDB.php');


  $insertSQL = sprintf("INSERT INTO acquittance_eng_1 (Acquittance_No, Area_No, Person_Id, Acq_Date) VALUES (%s, %s, %s, %s)",
                       $this->Get_Last_Rec("acquittance_eng_1",'Acquittance_No')+1,
					   $Area_No,
                      $Person_Id,
					   $this->Get_System_Date());

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($insertSQL, $BMConnectionDB) or die(mysql_error());
  
  }	
	
	
	function Update_Acq($Acq_No)
	{
	include('../Connections/BMConnectionDB.php');

	$updateSQL = sprintf("UPDATE acquittance_eng_1 SET Property_Taxes=%s, Job_License=%s, Education_Ministry_Taxes=%s, Municipality_Rent=%s, Occupation_License=%s, Garbage_Fee=%s, Municipality_Court=%s, License_Bulding=%s, Water_Invoice=%s, Watercourses_Fee=%s, Other_Cridites=%s WHERE Acquittance_No=%s",
                       $this->Property_Taxes,
                       $this->Job_License,
                       $this->Education_Ministry_Taxes,
                       $this->Municipality_Rent,
                       $this->Occupation_License,
                       $this->Garbage_Fee,
                       $this->Municipality_Court,
                       $this->License_Bulding,
                       $this->Water_Invoice,
                       $this->Watercourses_Fee,
                       $this->Other_Cridites,
					   $Acq_No);

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($updateSQL, $BMConnectionDB) or die(mysql_error());
  
	}
	
	
	
	
		
		
		
		


function Acq_Delete($Acquittance_No)
{
include('../Connections/BMConnectionDB.php');

  $deleteSQL = sprintf("DELETE FROM acquittance_eng_1 WHERE Acquittance_No=%s",
                       $Acquittance_No);

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($deleteSQL, $BMConnectionDB) or die(mysql_error());


}











}//End Acq Class


class LicenceRequist extends Requists

{

var $Watercourse_Discription;
var $Type_Of_Used_Materials;
var $Perpose_Of_Useing_Bulding;
var $Eng_Office;
var $contractor_Id;
var $Eng_Id;
var $Person_Id;
var $Area_No;
var $Geumatics_Eng_Notes;
var $City_Engineer_Readings;
var $Organization_Committie_Notes;
var $Special_Conditions;
var $General_Notes;
var $Bulding_Type;
var $Insurance;
var $Area_Pass;
var $Size_Pass;
var $Flor_Pass;
var $Rate_Pass;
var $Insted_Of_Station;
var $Squat_Of_Bulding;
var $Flor_Area;
var $Flor_Height;
var $Total_Cubeic;
var $First_level_Cost;
var $Total_Sum;


function LicenceRequist($WD,$TM,$PB,$CID,$EID,$PID,$EO,$ANO,$GEN,$CER,$OCN,$Sp_Cn,$Gn_Nt,$Bl_Tp,$Insur,$Ara_Ps,$Siz_Ps,$Flr_Ps,$Rt_Ps,$Ins_St,$Sqt_Bld,$Flr_Ara,$Flr_Ht,$Tot_Cbc,$Cost,$Sum)
{
$this->Watercourse_Discription=$WD;

$this->Type_Of_Used_Materials=$TM;

$this->Perpose_Of_Useing_Bulding=$PB;

$this->contractor_Id=$CID;

$this->Eng_Id=$EID;

$this->Person_Id=$PID;

$this->Eng_Office=$EO;

 $this->Area_No=$ANO;
$this->Geumatics_Eng_Notes=$GEN;
$this->City_Engineer_Readings=$CER;
$this->Organization_Committie_Notes=$OCN;
$this->Special_Conditions=$Sp_Cn;
$this->General_Notes=$Gn_Nt;
//
$this->Bulding_Type=$Bl_Tp;
$this->Insurance=$Insur;
$this->Area_Pass=$Ara_Ps;
$this->Size_Pass=$Siz_Ps;
$this->Flor_Pass=$Flr_Ps;
$this->Rate_Pass=$Rt_Ps;
$this->Insted_Of_Station=$Ins_St;
$this->Squat_Of_Bulding=$Sqt_Bld;
$this->Flor_Area=$Flr_Ara;
$this->Flor_Height=$Flr_Ht;
$this->Total_Cubeic=$Tot_Cbc;
$this->First_level_Cost=$Cost;
$this->Total_Sum=$Sum;
					   

}


//*********************************************************************

function Licence_Requist_Insert()
{
include('../Connections/BMConnectionDB.php');
  $insertSQL = sprintf("INSERT INTO license_requist_eng_9 (Requist_No, Watercourse_Discription, Type_Of_Used_Materials, Perpose_Of_Useing_Bulding, Receving_Date, contractor_Id, Eng_Id, Person_Id, Eng_Office, Area_No) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                       $this->Get_Last_Rec("license_requist_eng_9",'Requist_No')+1,
					   //Get_Rate_Percent(),
                       $this->Watercourse_Discription,
                       $this->Type_Of_Used_Materials,
                       $this->Perpose_Of_Useing_Bulding,
                       $this->Get_System_Date(),
                       $this->contractor_Id,
                       $this->Eng_Id,
                       $this->Person_Id,
                       $this->Eng_Office,
					  $this->Area_No);

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($insertSQL, $BMConnectionDB) or die(mysql_error());
  
 
}//end



function Licence_Requist_Main_Update($R_NO,$SDate,$EDate,$Rate,$Final_Cert)
{
include('../Connections/BMConnectionDB.php');
 $updateSQL = sprintf("UPDATE license_requist_eng_9 SET Rate_Percent=%s, Watercourse_Discription=%s, Type_Of_Used_Materials=%s, Perpose_Of_Useing_Bulding=%s, Start_Working_Date=%s,contractor_Id=%s, Eng_Id=%s, Person_Id=%s, Eng_Office=%s, Final_Certification=%s, End_Work_Date=%s , Area_No=%s  where Requist_No=".$R_NO,
   // $updateSQL = sprintf("UPDATE license_requist_eng_9 SET Rate_Percent=%s, Watercourse_Discription=%s, Type_Of_Used_Materials=%s, Perpose_Of_Useing_Bulding=%s, contractor_Id=%s, Eng_Id=%s, Person_Id=%s, Eng_Office=%s, Final_Certification=%s, Area_No=%s  where Requist_No=".$R_NO,
                       $Rate,
					   //Get_Rate_Percent(),
                       $this->Watercourse_Discription,
                       $this->Type_Of_Used_Materials,
                       $this->Perpose_Of_Useing_Bulding,
                       $SDate,
                       $this->contractor_Id,
                       $this->Eng_Id,
                       $this->Person_Id,
                       $this->Eng_Office,
					   $Final_Cert,
					   $EDate,
					  $this->Area_No);

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($updateSQL, $BMConnectionDB) or die(mysql_error());
  
 
}//end



function Update_Readings($Req_No)
{
include('../Connections/BMConnectionDB.php');
$updateSQL = sprintf("UPDATE license_requist_eng_9 SET Geumatics_Eng_Notes=%s, City_Engineer_Readings=%s, Organization_Committie_Notes=%s WHERE Requist_No=".$Req_No,
                       $this->Geumatics_Eng_Notes,
                       $this->City_Engineer_Readings,
                       $this->Organization_Committie_Notes);

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($updateSQL, $BMConnectionDB) or die(mysql_error());
}


function Update_Notes_Condition($Req_No)
{include('../Connections/BMConnectionDB.php');
 $updateSQL = sprintf("UPDATE license_requist_eng_9 SET Special_Conditions=%s,  General_Notes=%s WHERE Requist_No=".$Req_No,
                       $this->Special_Conditions,
                       $this->General_Notes);

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($updateSQL, $BMConnectionDB) or die(mysql_error());

}


function Update_Fee($Req_No)
{
include('../Connections/BMConnectionDB.php');
 $updateSQL = sprintf("UPDATE license_requist_eng_9 SET  Type_Of_Bulding=%s, Insurance=%s, Passing_Over_Withdrawal_Aaea=%s, Passing_Over_Size=%s, Passing_Over_Floor_Rate_Percent=%s, Passing_Over_Rate_Percent=%s, Insted_Of_Station=%s, Squat_Of_Bulding=%s, Floor_Area=%s, Floor_Height=%s, Cubeic=%s, Meter_Mapping=%s, `Sum`=%s  where Requist_No=".$Req_No,
		
                        $this->Bulding_Type,
					    $this->Insurance,
					    $this->Area_Pass,
						$this->Size_Pass,
						$this->Flor_Pass,
						$this->Rate_Pass,
						$this->Insted_Of_Station,
						$this->Squat_Of_Bulding,
						$this->Flor_Area,
						$this->Flor_Height,
						$this->Total_Cubeic,
						$this->First_level_Cost,
						$this->Total_Sum
					   
                       );

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($updateSQL, $BMConnectionDB) or die(mysql_error());


}


function Lcence_Requist_Delete($Requist_No)
{
include('../Connections/BMConnectionDB.php');
//if ((isset($_GET['Requist_No'])) && ($_GET['Requist_No'] != "")) {
  $deleteSQL = sprintf("DELETE FROM license_requist_eng_9 WHERE Requist_No=%s",
                       $Requist_No);
//echo "NNNNNNNNNNNNNN";
  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($deleteSQL, $BMConnectionDB) or die(mysql_error());
/***********************************/
 $deleteSQL = sprintf("DELETE FROM organizing_information_schdule_10 WHERE Requist_No=%s",
                       $Requist_No);
//echo "NNNNNNNNNNNNNN";
  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($deleteSQL, $BMConnectionDB) or die(mysql_error());




}




		
		
		


}//End Licence Requist Class


//Start Of Area Accpetance Requist

class Area_Accptance_Requist extends Requists
{
var $Person_Id;
var $Area_No;
var $State;


function Area_Accptance_Requist($PID,$A_No,$Stat)
{
$this->Person_Id=$PID;
$this->Area_No=$A_No;
$this->State=$Stat;

}


function Get_Last_Area_Req_Rec()
{

include('../Connections/BMConnectionDB.php');
mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
	$query_Recordset1 = "SELECT Area_Accept_Requist_No from area_plane_acceptance_requist_eng2";
	$Recordset1 = mysql_query($query_Recordset1, $BMConnectionDB) or die(mysql_error());
	$row_Recordset1 = mysql_fetch_assoc($Recordset1);
	$totalRows_Recordset1 = mysql_num_rows($Recordset1);
	$i=0;
	do {
		++$i;
		if($totalRows_Recordset1==$i)
			{
				return $row_Recordset1['Area_Accept_Requist_No'];
			}
 	   } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); 
}


		

function Insert_Area_Requist()
{
include('../Connections/BMConnectionDB.php');
$insertSQL = sprintf("INSERT INTO area_plane_acceptance_requist_eng2 (Area_Accept_Requist_No,Person_Id, Area_No,Requist_Date) VALUES ( %s, %s,%s, %s)",
                       $this->Get_Last_Rec("area_plane_acceptance_requist_eng2",'Area_Accept_Requist_No')+1,
					   $this->Person_Id,
                       $this->Area_No,
					   $this->Get_System_Date());

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($insertSQL, $BMConnectionDB) or die(mysql_error());
  
}


function Area_Req_Update($Req_No)
{

include('../Connections/BMConnectionDB.php');
$updateSQL = sprintf("UPDATE area_plane_acceptance_requist_eng2 SET Person_Id=%s, Area_No=%s, State=%s WHERE Area_Accept_Requist_No=$Req_No",
                       $this->Person_Id,
                       $this->Area_No,
					   $this->State);


mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($updateSQL , $BMConnectionDB) or die(mysql_error());

}


function Area_Requist_Delete($Req_No)
{
include('../Connections/BMConnectionDB.php');
 $deleteSQL = sprintf("DELETE FROM attached_documents_eng_4 WHERE Requist_No=%s",$Req_No);

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($deleteSQL, $BMConnectionDB) or die(mysql_error());

}



}//End Of Area Accptance Requist

//start  reports class
class Reports
{


function Get_Last_Rec($Table)
		{

include('../Connections/BMConnectionDB.php');
mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
	$query_Recordset1 = "SELECT Report_No from $Table";
	$Recordset1 = mysql_query($query_Recordset1, $BMConnectionDB) or die(mysql_error());
	$row_Recordset1 = mysql_fetch_assoc($Recordset1);
	$totalRows_Recordset1 = mysql_num_rows($Recordset1);
	$i=0;
	do {
		++$i;
		if($totalRows_Recordset1==$i)
			{
				return $row_Recordset1['Report_No'];
			}
 	   } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); 
}






}//end class reports

class Vision_Report extends Reports
{

function Insrt_Vision_Report($Start_Time,$End_Time,$Results,$Date,$Emp_No)
{
include('../Connections/BMConnectionDB.php');
$insertSQL = sprintf("INSERT INTO vesion_report_eng_14 (Report_No, Round_Start_Time, Round_End_Time, Results_Of_Inspection_Round, Date_Of_Results,Emp_No) VALUES (%s, %s, %s, %s,%s,%s)",
                       $this->Get_Last_Rec("vesion_report_eng_14")+1,
					   $Start_Time,
                       $End_Time,
                       $Results,
                       $Date,
					   $Emp_No);

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($insertSQL, $BMConnectionDB) or die(mysql_error());

}


function Update_Vision_Report_Res($R_No,$Start_Time,$End_Time,$Notes,$Emp_Date,$Results,$R_Date,$Emp_No)
{
include('../Connections/BMConnectionDB.php');

$updateSQL = sprintf("UPDATE vesion_report_eng_14 SET Round_Start_Time=%s , Round_End_Time=%s, Notes=%s, Date_Of_Notes=%s , Results_Of_Inspection_Round=%s, Date_Of_Results=%s,  Emp_No=%s WHERE Report_No=$R_No ",
                       $Start_Time,
                       $End_Time,
					   $Notes,
                       $Emp_Date,
					   $Results,
					   $R_Date,
					   $Emp_No);

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($updateSQL, $BMConnectionDB) or die(mysql_error());


}


function Update_Vision_Report_Admn($R_No,$Start_Time,$End_Time,$Notes,$Emp_Date,$Results,$R_Date,$Admin_Notes,$Recomends_Date,$Emp_No)
{
include('../Connections/BMConnectionDB.php');
$updateSQL = sprintf("UPDATE vesion_report_eng_14 SET Round_Start_Time=%s , Round_End_Time=%s, Notes=%s, Date_Of_Notes=%s , Results_Of_Inspection_Round=%s, Date_Of_Results=%s, Admin_Notes=%s, Admin_Notes_Date=%s, Emp_No=%s WHERE Report_No=$R_No ",
                       $Start_Time,
                      $End_Time,
                     $Notes,
                       $Emp_Date,
                       $Results,
                       $R_Date,
                       $Admin_Notes,
                      $Recomends_Date,
                       $Emp_No
                       );

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($updateSQL, $BMConnectionDB) or die(mysql_error());

}

function Delete_Vision_Report($Report_No)
{
include('../Connections/BMConnectionDB.php');
 $deleteSQL = sprintf("DELETE FROM vesion_report_eng_14 WHERE Report_No=%s",
                       $Report_No);

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($deleteSQL, $BMConnectionDB) or die(mysql_error());


}

}

class Work_Report extends Reports
{

function Insert_Work_Report($Inspector_Notes,$Date,$Emp_No)
{
include('../Connections/BMConnectionDB.php');
//echo $this->Get_Last_Rec("work_report_eng_15")+1;
 $insertSQL = sprintf("INSERT INTO work_report_eng_15 (Report_No, Inspector_Notes, Date_Of_Insp_Note,Emp_No) VALUES (%s,%s, %s,%s)",
                       $this->Get_Last_Rec("work_report_eng_15")+1,
					   $Inspector_Notes,
                       $Date,
					   $Emp_No);

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($insertSQL, $BMConnectionDB) or die(mysql_error());
  

}

function Update_Wrok_Rep_Cheif($Report_N,$Inspector_Notes,$Inspector,$Section_Supervisor_Notes,$Section_Date,$administrator_Notes,$Pose_Date,$Chief_Notes,$Cheif_Date)
{
include('../Connections/BMConnectionDB.php');
$updateSQL = sprintf("UPDATE work_report_eng_15 SET Inspector_Notes=%s, Date_Of_Insp_Note=%s, Section_Supervisor_Notes=%s, Date_Of_Notes_Se=%s, administrator_Notes=%s, Date_Of_Notes_Ad=%s, Chief_Notes=%s, Date_Of_Notes_Ch=%s WHERE Report_No=".$Report_N,
                       $Inspector_Notes,
                       $Inspector,
                       $Section_Supervisor_Notes,
                       $Section_Date,
                       $administrator_Notes,
                       $Pose_Date,
                       $Chief_Notes,
                       $Cheif_Date);

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($updateSQL, $BMConnectionDB) or die(mysql_error());

}

function Update_Wrok_Rep_Admn($Report_N,$Inspector_Notes,$Inspector,$Section_Supervisor_Notes,$Section_Date,$administrator_Notes,$Pose_Date)
{
include('../Connections/BMConnectionDB.php');
$updateSQL = sprintf("UPDATE work_report_eng_15 SET Inspector_Notes=%s, Date_Of_Insp_Note=%s, Section_Supervisor_Notes=%s, Date_Of_Notes_Se=%s, administrator_Notes=%s, Date_Of_Notes_Ad=%s WHERE Report_No=".$Report_N,

                       $Inspector_Notes,
                       $Inspector,
                       $Section_Supervisor_Notes,
                       $Section_Date,
                       $administrator_Notes,
                       $Pose_Date
                       );

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($updateSQL, $BMConnectionDB) or die(mysql_error());

}


function Update_Wrok_Rep_Super($Report_N,$Inspector_Notes,$Inspector,$Section_Supervisor_Notes,$Section_Date)
{
include('../Connections/BMConnectionDB.php');
$updateSQL = sprintf("UPDATE work_report_eng_15 SET Inspector_Notes=%s, Date_Of_Insp_Note=%s, Section_Supervisor_Notes=%s, Date_Of_Notes_Se=%s WHERE Report_No=".$Report_N,

                       $Inspector_Notes,
                       $Inspector,
                       $Section_Supervisor_Notes,
                       $Section_Date);

  mysql_select_db($database_BMConnectionDB, $BMConnectionDB);
  $Result1 = mysql_query($updateSQL, $BMConnectionDB) or die(mysql_error());

}



}

?>